#!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# @Time : 2019/2/27 0027
# @Email : jtyoui@qq.com

"""
控制命令
python manage.py db init #初始化
python manage.py db migrate #迁移文件
python manage.py db upgrade #更新
"""
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app
from exts import db
from models import User, Question,Answer

manage = Manager(app)

# 使用migrate绑定app和db
migrate = Migrate(app, db)

# 添加迁移脚本的命令到manage中
manage.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manage.run()
